// src/api/usercoupon.js
import axios from "axios";

const API_URL = "http://localhost:8080/app/userCoupon";

// 查询我的优惠券
export const getUserCouponsByStatus = (userId, status) => {
  console.log("👉 查询用户优惠券:", `${API_URL}/userId/${userId}/status/${status}`);
  return axios.get(`${API_URL}/userId/${userId}/status/${status}`);
};

// 领取优惠券
export const receiveCoupon = (userCoupon) => {
  console.log("📌 发送领取优惠券:", userCoupon);
  return axios.post(API_URL, userCoupon);
};
